package my.poemlib.bo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import my.poemlib.dao.UserDao;
import my.poemlib.vo.User;

@Component
public class UserBoImpl implements UserBo {
	@Autowired
	private UserDao userDao;

	@Override
	public User getUser(String userName,String password) {
		User u = userDao.getUser(userName);
		if(u.getPassword().equals(password)){
			return u;
		}
		return new User();
	}

}
